from tkinter import *
from lxg_tkinter import Quitter


def fetch():
    print("输入的内容是：", ent.get())


root = Tk()
ent = Entry(root)
ent.insert(0, '在这里输入文本')
# 水平方向增大
ent.pack(side=TOP, fill=X)

# 聚焦
ent.focus()
# 绑定回车
ent.bind('<Return>', (lambda event: fetch()))
btn = Button(root, text='提交', command=fetch)
btn.pack(side=LEFT)
Quitter(root).pack(side=RIGHT)
root.mainloop()
